//
//  HeaderModeFrame.m
//  CarTown
//
//  Created by xionghao on 15/9/24.
//  Copyright (c) 2015年 熊浩. All rights reserved.
//

#import "HeaderModeFrame.h"
#import "HeaderModel.h"
@implementation HeaderModeFrame
-(void)setHeadmode:(HeaderModel *)headmode{
    _headmode=headmode;
    CGFloat textwith= 209;
    NSDictionary *attribute = @{NSFontAttributeName: [UIFont systemFontOfSize:15]};
    
    CGSize labelSize = [_headmode.name boundingRectWithSize:CGSizeMake(textwith, 0) options: NSStringDrawingTruncatesLastVisibleLine | NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:attribute context:nil].size;
    self.rowheight=8+labelSize.height+17+24;
}
@end
